package sqlserver;

import java.io.File;
import java.sql.Connection;

import org.firefly.db.util.DBInfo;
import org.firefly.db.util.DBName;
import org.firefly.db.util.DBUtils;

public class Caiwu {

	/**
	 * @param args
	 * @throws Exception 
	 */
	public static void main(String[] args) throws Exception {
		Class.forName("net.sourceforge.jtds.jdbc.Driver");
		Connection srcConn = java.sql.DriverManager.getConnection("jdbc:jtds:sqlserver://192.168.1.5:1433/rdcwv1", "sa", "eplugger");
		try {
			DBInfo srcInfo = new DBInfo(srcConn, null, DBName.SqlServer2005);
			File sqlFile = new File("/Users/firefly/Desktop/a/caiwu_v1.sql");
			DBUtils.dbConvertA2SqlFile(srcInfo, sqlFile);
		} finally{
			srcConn.close();
//			tarConn.close();
		}
	}

}
